﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace br.com.SistemaChamados.DAO.QueryManager
{
    public class QueryManagerConstants
    {
        public static string EXPRESSION_TABLE_NAME = "$TABLE_NAME$";
        public static string EXPRESSION_IDENTIFIER_FIELD = "$IDENTIFIER_FIELD$";
        public static string EXPRESSION_VALUE_FIELD = "$VALUE_FIELD$";
        public static string EXPRESSION_SET_FIELDS = "$SET_FIELDS";
        public static string EXPRESSION_CONDITIONS_UPDATE = "$CONDITIONS_UPDATE$";

        public static string PREFIX_TABLE = "TBL_";
        public static string PREFIX_FIELD = "TBL_";
        public static string TEMPLATE_SQL_SELECT = "SELECT * FROM " + EXPRESSION_TABLE_NAME;
        public static string TEMPLATE_SQL_SELECT_IDENTIFIER = "SELECT * FROM " + EXPRESSION_TABLE_NAME + " WHERE " + EXPRESSION_IDENTIFIER_FIELD + " = " + EXPRESSION_VALUE_FIELD;
        public static string TEMPLATE_SQL_UPDATE = "UPDATE " + EXPRESSION_TABLE_NAME + " SET " + EXPRESSION_SET_FIELDS + " WHERE " + EXPRESSION_CONDITIONS_UPDATE;
        public static string TEMPLATE_SQL_DELETE = "DELETE FROM " + EXPRESSION_TABLE_NAME + " WHERE " + EXPRESSION_IDENTIFIER_FIELD + " = " + EXPRESSION_VALUE_FIELD;
    }
}